import request from '@/utils/request'
// 1.区域管理的表格数据
export const Regionsearch = (params) => {
  return request({
    url: '/vm-service/region/search',
    params
  })
}
// 2.区域管理的新增区域
export const addRegion = (data) => {
  return request({
    url: '/vm-service/region',
    method: 'post',
    data
  })
}
// 3.区域管理的修改区域
export const editRegion = (data) => {
  return request({
    url: `/vm-service/region/${data.id}`,
    method: 'put',
    data
  })
}
// 4.区域管理的查看详情--点位管理表格
export const Nodesearch = (params) => {
  return request({
    url: '/vm-service/node/search',
    params
  })
}
// 5.新增点位--所在商圈
export const GetbusinessType = () => {
  return request({
    url: '/vm-service/businessType'
  })
}
// 6.新增点位-归属合作商
// 9.合作商管理--表格数据
export const Partnersearch = (params) => {
  return request({
    url: '/user-service/partner/search',
    params
  })
}
// 7.新增点位的提交确定按钮
export const addNode = (data) => {
  return request({
    url: '/vm-service/node',
    method: 'post',
    data
  })
}

// 8.点位管理查看详情列表
export const getvmList = (id) => {
  return request({
    url: `/vm-service/node/vmList/${id}`
  })
}

// 9.点位管理-修改点位
export const updataNodeList = (data) => {
  return request({
    url: `/vm-service/node/${data.id}`,
    method: 'put',
    data
  })
}
// 10.合作商管理重置密码
export const updataPsw = (id) => {
  return request({
    url: `/user-service/partner/resetPwd/${id}`,
    method: 'put'
  })
}
// 11.新增合作商
export const addPartner = (data) => {
  return request({
    url: `/user-service/partner`,
    method: 'post',
    data
  })
}
// 12/修改合作商
export const updataPartner = (data) => {
  return request({
    url: `/user-service/partner/${data.id}`,
    method: 'put',
    data
  })
}
